#include "../src/SDLtoolkit/Surface.h"
#include "../src/gui/Application.h"

void testSurface(){

	Application* aplicacion = new Application();
	bool quit = false;
	//aplicacion->initializeSDL();
	Event* evento = new Event();

	while (quit == false) {

    		if (evento->getType() == Quit){
    			quit = true;
    		}
	}

	//aplicacion->engine->stop();

}

/*
    Surface* surface1 = new Surface(650, 500, 100, 30);
    SDL_Rect offset1;
    offset1.x = surface1->getRectangle().x;
    offset1.y = surface1->getRectangle().y;
    SDL_BlitSurface( surface1->getSurface(), &surface1->getSurface()->clip_rect, screen, &offset1 );

    Surface* surface2 = new Surface(0, 0, 100, 30);
    SDL_Rect offset2;
    offset2.x = 650;
    offset2.y = 400;
    SDL_BlitSurface( surface2->getSurface(), &surface2->getSurface()->clip_rect, screen, &offset2 );

    Surface* surface3 = new Surface(0, 0, 64, 128);
    SDL_Rect offset3;
    offset3.x = 450;
    offset3.y = 300;
    surface3->loadSurfaceImage("res/img/foo.png");

    SDL_BlitSurface( surface3->getSurface(), &surface3->getSurface()->clip_rect, screen, &offset3 );

    SDL_Flip(screen);

    bool quit = false;
    SDL_Event event;
    while( quit == false ) {
        while( SDL_PollEvent( &event ) ) {
            if( event.type == SDL_QUIT ) {
                quit = true;
            }
        }
    }
    SDL_FreeSurface(screen);
    SDL_Quit();


// Pruebas en application usando engine
  	Surface* surface1 = new Surface(650, 500, 100, 30);
    SDL_Rect offset1;
    offset1.x = surface1->getRectangle().x;
    offset1.y = surface1->getRectangle().y;

    Surface* surface2 = new Surface(0, 500, 100, 30);
    SDL_Rect offset2;
    offset2.x = 650;
    offset2.y = 400;


}


	 Surface* surface1 = new Surface();
	cout<< "surface1: creada"<< endl;

	this->engine->drawSurface(surface1);
	cout<< "surface1: dibujada en pantalla"<< endl;
	this->engine->refreshScreen();
	cout<< "surface1: pantalla refrescada"<< endl;
*/
